#include <iostream>
#include <vector>
#include <set>
using namespace std;

int countDistinctWord(string str) {
	int a;
	a=0;
	int b;
	b=str.size();
	for(int i=1;i<=b;i++)
		if(str[i]==' ')
			a++;
	return a+1;//在此处添加相应代码
}

int main() {
	string str = "hello hello wwor world! Ni";
	cout << countDistinctWord(str) << endl;

	return 0;
}